#ifndef __FRIEND_H__
#define __FRIEND_H__

#include "status.h"

#include <QString>
#include <QList>

class Friend {
public:
	Friend(const int id = 0, Status status = Offline, const QString login = "");
	~Friend();

	int getId() const;

	void setStatus(Status status);
	Status getStatus() const;

	QString getName() const;
	QString getLogin() const;

	QList<int> getChats() const;
	void addChat(int chatId);
	void removeChat(int chatId);

	template<class Archive> void serialize(Archive& ar, const unsigned int /* version */) {
		ar & id;
		ar & status;
		ar & login;
	}

private:
	int id;
	Status status;
	QString login;
	QList<int> chats;
};


#endif

